/*
 * StdChatWindowModule.h
 *
 *  Created on: 09.08.2009
 *      Author: h3llfire
 */

#ifndef STDCHATWINDOWMODULE_H_
#define STDCHATWINDOWMODULE_H_

#include "../../core/interfaces/iChatWindow.h"
#include "../../core/interfaces/iUserInterface.h"
#include "../../core/utils/ButtonList.h"
#include "ChatWindow.h"
#include <vector>

namespace Impp {

class ChatWindow;

enum ChatWindowMode{
	CHAT_WINDOW_USE_TABS = 1,
	CHAT_WINDOW_NO_TABS = 2
};

#define STD_CHATWINDOW_MODULE_NAME					wxT("StdChatWindow")
#define STD_CHATWINDOW_MODULE_ACTION_SHOW_WINDOW	wxT("showChatWindow")


class StdChatWindowModule : public iChatWindow{

DECLARE_DYNAMIC_CLASS(StdChatWindowModule)

private:
	ChatWindowMode mode;
	std::vector<ChatWindow*> windows;
	ButtonList buttonList;

public:
	StdChatWindowModule();
	virtual ~StdChatWindowModule();

	void moduleInit();
	void moduleDestroy();

	void showChatWindow(Buddy* buddy);
	void addActionButtion(const wxString & moduleName, const wxString & actionName, const wxString & title, const wxString & description);
	void onMessageIn(MessageEvent & event);
	void onTypingNotification(TypingNotificationEvent & event);
	void onImppCommand(ImppCommandEvent & event);
	ButtonList* getButtonList();

private:
	ChatWindow* getWindowFor(Buddy* buddy);

private:
	static void wxCALLBACK addShowChatWindowToBuddyMenu(iMenu* menu, Buddy* userData);

};

}

#endif /* STDCHATWINDOWMODULE_H_ */
